# write by hasaki
# first edit on 2019/06/25
# last change on 2019/06/25
# use for test exchange.go
from websocket import create_connection
import json
from time import sleep
url='ws://127.0.0.1:6666'
origin_data={"userID":0,"type":"order","direction":"bid","price":100,"volume":100,"symbol":"a"}
data_json=json.dumps(origin_data)

a=create_connection(url)
while 1:
    sleep(1)
    a.send(data_json)
    print(a.recv())
